<% breadcrumb :activities %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>活动管理</h5>
      </div>
      <div class="ibox-content">
        <div class="project-list">

          <div class="row">
            <div class="col-sm-12">
              <%= link_to '新增活动', new_event_activity_path, class: 'btn btn-white btn-sm pull-right' %>
            </div>
          </div>

          <div class="row">

          <table class="table table-hover">
            <tbody>

            <% @activities.each do |activity| %>
            <tr>
              <td class="session-date">
                <%= activity.start_date %> <%= activity.day_of_week_in_chinese %>
                <br>
                <small><%= activity.start_time %> - <%= activity.end_time %> </small>
              </td>
              <td class="session-name"><%= activity.name %> </td>

              <td class="project-actions">
                <%= link_to edit_event_activity_path(current_event, activity), class: 'btn btn-white btn-sm' do%>
                <i class="fa fa-pencil"></i> 修改
                <% end %>

                <%= link_to event_activity_path(current_event, activity), method: :delete, data: {confirm: '是否确认删除？'}, class: 'btn btn-white btn-sm' do %>
                  <i class="fa fa-trash"></i> 删除
                <% end %>
              </td>
            </tr>
            <% end %>

            </tbody>
          </table>
          </div>
        </div>

      </div>
    </div>
  </div>
</div>